/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.OCP.violet.service.imp;

import za.ac.cput.OCP.violet.model.Gladiator;
import za.ac.cput.OCP.violet.model.Templar;
import za.ac.cput.OCP.violet.model.Warrior;
import za.ac.cput.OCP.violet.service.OcpViolet;

/**
 *
 * @author DieFStaL
 */
public class OcpVioletImpl implements OcpViolet {

    public void levelUp(Warrior warrior) {
        if (warrior instanceof Gladiator) {
            Gladiator gladiator = (Gladiator) warrior;
            gladiator.setLevel(gladiator.getLevel() + 1);
        }
        if (warrior instanceof Templar) {
            Templar templar = (Templar) warrior;
            templar.setLevel(templar.getLevel() + 1);
        }
    }
}
